package com.devunion.reader.server.mediator;

import com.devunion.reader.client.to.AnnotationTo;
import com.devunion.bogdan.model.project.Annotation;

/**
 * @author Timoshenko Alexander 28.05.2009 : 11:21:49
 */
public class AnnotationMediator implements IMediator<Annotation, AnnotationTo> {
    public AnnotationTo copyFromEntity(Annotation anEntity) {
        AnnotationTo theTo = new AnnotationTo();
        theTo.setId(anEntity.getAnnotationId());
        theTo.setHeight(anEntity.getHeight());
        theTo.setText(anEntity.getText());
        theTo.setType(anEntity.getType().name());
        theTo.setWidth(anEntity.getWidth());
        theTo.setX(anEntity.getX());
        theTo.setY(anEntity.getY());
        return theTo;
    }
}
